<docs>
  ##
</docs>
<template>
  <div class="index" ref="index" :style="{minHeight: winHeight}">
    <router-view></router-view>
    <!-- bar 功能导航 -->
    <tab-bar></tab-bar>
  </div>
</template>
<script>
import tabBar from "base/tabBar/tabBar";
export default {
  name: "index",
  components: { tabBar },
  data() {
    return {
      winHeight: ""
    };
  },

  mounted() {
    // fix mobile height
    const eleHeight = this.$refs.index.offsetHeight || 0;
    const windowHeight = this.$store.state.winHeight;
    this.winHeight = `${Math.max(windowHeight, eleHeight)}px`;
  }
};
</script>
